//
//  DXMLPeriodObject.h
//  DerbyStatter
//
//  Created by glenn andreas on 1/6/14.
//  Copyright (c) 2014 glenn andreas. All rights reserved.
//

#import "DXMLObjectThing.h"
#import "DXMLEventObject.h"

@class DXMLTimestamp;
@class DXMLBoutObject;
@class DXMLJamObject;
@class DXMLTeamObject;
@interface DXMLPeriodObject : DXMLEventObject
@property (readonly) DXMLBoutObject *bout;
@property (strong) DXMLTimestamp *periodEnd;
@property (assign) NSInteger number;
- (NSInteger) numberOfJams;
- (DXMLJamObject *)jamAtIndex: (NSInteger) index;
- (DXMLJamObject *)jamAtIndex: (NSInteger) index source: (DXMLEventSource) source;
- (void) enumerateJams: (void (^)(DXMLJamObject *jam, BOOL *stop)) block;
// derived
- (NSInteger) periodTotalForTeam: (DXMLTeamObject *) team upToJam: (NSInteger) jam;
@property (strong) NSArray *jams;
@end